import { matchRoutes } from "react-router-config";
import { Redirect } from "react-router-dom";
import {
    Login,
    NotFound,
    Repair,
    LeaseWithdrawal,
    RoomManage,
    RentalMange,
    RentalPayment,
    Regulations,
    RepairRecord,
    AirInfo,
    UploadStudentInfo,
    RentalProcessQuery,
    LeaseWithdrawalManage,
    AddAdminPage,
    AddAirInfo,
    ModifyAirInfo,
    AddStudentInfo,
    ModifyStudentInfo
} from "../pages";
export const mainRouter = [
    {
        //登录页面
        pathname: '/login',
        component: Login
    },
    {
        pathname: '/404',
        component: NotFound
    }
]

export const adminRouters = [
    {
        pathname: '/admin/regulations',
        component: Regulations,
        title:'相关管理规定',
        isNav: true,
        exact:true,
        icon:1,//<DashboardOutlined />
        
    },
    {
        pathname: '/admin/room-manage',
        component: RoomManage,
        title:'学生宿舍管理（管理员）',
        isNav: true,
        exact:true,
        icon:2,//<TeamOutlined />
    },
    {
        pathname: '/admin/rental-list',
        component: RentalMange,
        title:'租赁信息管理（管理员）',  
        isNav: true,
        exact:true,
        icon:3,//<UserOutlined />
        
    },
    {
        pathname: '/admin/repair-record',
        component: RepairRecord,
        title:'报修记录（管理员）',
        isNav: true,
        exact:true,
        icon:7,
        
    },
    {
        pathname: '/admin/air_info',
        component: AirInfo,
        title: '空调信息（管理员）',
        isNav: true,
        exact: true,
        icon:  8,
    },
    {
        pathname: '/admin/lease_withdrawal_info',
        component: LeaseWithdrawalManage,
        title: '退租信息管理（管理员）',
        isNav: true,
        exact: true,
        icon:  11,
    },
    {
        pathname: '/admin/add_admin',
        component: AddAdminPage,
        title: '添加管理员（管理员）',
        isNav: true,
        exact: true,
        icon:  12,
    },
    {
        pathname: '/admin/upload_student_info',
        component: UploadStudentInfo,
        title: '学生信息导入（管理员）',
        isNav: true,
        exact: true,
        icon:  9,
    },
    {
        pathname: '/admin/add_air_info',
        component: AddAirInfo,
        title: '空调信息（管理员）',
        isNav: false,
        exact: true,
    },
    {
        pathname: '/admin/rental_payment',
        component: RentalPayment,
        title:'租赁缴费（学生）',
        isNav: true,
        exact:true,
        icon:4, //<SnippetsOutlined />
    },
    {
        pathname: '/admin/repair',
        component: Repair,
        isNav: true,
        exact:true,
        title:'报修（学生）', 
        icon:5,//<QuestionCircleOutlined />
    },
    {
        pathname: '/admin/lease-withdrawal',
        component: LeaseWithdrawal,
        title:'退租办理（学生）',
        isNav: true,
        exact:true,
        icon:6,//<SmileOutlined />
    },
    {
        pathname: '/admin/rental-process-query',
        component: RentalProcessQuery,
        title:'租赁结果查询（学生）',
        isNav: true,
        exact:true,
        icon:10,//SearchOutlined
    },
    {
        pathname: '/admin/modify_air_info',
        component: ModifyAirInfo,
        title: '修改空调信息（管理员）',
        isNav: false,
        exact: true,
    },
    {
        pathname: '/admin/add_student_info',
        component: AddStudentInfo,
        title: '添加学生信息（管理员）',
        isNav: false,
        exact: true,
    },
    {
        pathname: '/admin/modify_student_info',
        component: ModifyStudentInfo,
        title: '修改学生信息（管理员）',
        isNav: false,
        exact: true,
    }
]


